/*
SteelNzb
Copyright (C) 2008  Wessel v. Staal

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifndef NZB_INCLUDED
#define NZB_INCLUDED

typedef struct nzbFile
{
	char filename[255];
	char group[128];
	int internalNum;
} nzbFile;

typedef struct nzbFilePart
{
	int size;
	int segment;
	char id[128];
} nzbFilePart;

void* nzb_openNzb(char* file);
nzbFile* nzb_getNextFile(void* state);
nzbFilePart* nzb_getNextPart(void* state);
void nzb_closeNzb(void* state);
int nzb_getArticleCountAndValidate(void* stateptr, char* xsdpath);

char* nzb_getCurrentFilename(void* state);
char* nzb_getCurrentGroup(void* state);
char* nzb_getCurrentNzbFilename(void* state);
int nzb_isEof(void* stateptr);
int nzb_getCurrentInternalNum(void* state);
int nzb_getNumPartsRead(void* state);

#endif
